﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Entity.Car_Rental
{
    public partial class OrderItem : EntityBase
    {
        public override object[] PrimaryKey
        {
            get { return new object[] { this.OrderItemID }; }
        }

        partial void OnCreated()
        {

            base.IsRealDeleted = false;//假删除
            base.Initialization();//基类的某些属性初始化
            this.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(base.PropertyChangedEvent);//初始实体时，先订阅列修改的事件
        }

        #region 导航属性
        public Product_Property_R Product_Property_R_Extend { get; set; }
        /// <summary>
        /// 总计
        /// </summary>
        public decimal TotalPrice { get { return this.SalePrice * this.Quantity; } }

        public RentalRecord RentalRecord_Extend { get; set; }
        #endregion
    }

    public class OrderItem_Ext : OrderItem { }
}
